import QtQuick 2.0
import QtQuick.Dialogs 1.0
import QtQuick.Controls 1.0
import NstRendering 1.0
//import "FileDialogs.qml"
Rectangle {
    id:area
    //property bool landscape : angle === 90||angle === 270
    width:1200;height: 600       
    Rectangle{
        id:area1
        x:0;y:0
        width: parent.width/6;height: parent.height
        color:"red"
        Button{
            id:button
            width:50
            anchors.top:parent.top;anchors.left: parent.left
            text:"Back"
//            MouseArea{

//            }
        }
        Button{
            anchors.top:parent.top;anchors.left:button.right
            anchors.leftMargin: 40
            width: 50
            text:"Home"
//            MouseArea{
//                id:mouseArea

//            }
            Connections{
                //target:mouseArea
                onClicked:{
                    filedialog.visible=true
                }
            }
        }
        MoveButton{
            anchors.horizontalCenter:parent.horizontalCenter
            anchors.verticalCenter: parent.verticalCenter
        }
    }
    Rectangle{
        id:area2
        anchors.left: area1.right
        anchors.leftMargin: 2
        width:(parent.width/6)*4;height: parent.height
        color:"green"

        ThreadRenderer {
            anchors.fill: parent
            id: renderer

//            Timer {
//                interval: 10; running: true; repeat: true
//                onTriggered: renderer.update()
//            }

        }

    }
    Rectangle{
        id:area3
        anchors.left: area2.right
        anchors.leftMargin: 2
        width:parent.width/6;height: parent.height
        color:"blue"
        Button{
            anchors.left: parent.left
            anchors.leftMargin: parent.width/6
            anchors.bottom: parent.bottom
            anchors.bottomMargin:150
            width:50
            text:"Select"
//            MouseArea{

//            }
    }
        Button{
            anchors.right: parent.right
            anchors.rightMargin:parent.width/6
            anchors.bottom: parent.bottom
            anchors.bottomMargin:150
            width:50
            text:"Start"
//            MouseArea{

//            }
        }
        SelectButton{
            anchors.horizontalCenter: parent.horizontalCenter
            anchors.verticalCenter: parent.verticalCenter

        }
    }
//   TabSet{
//       width: 580
//       height: 440
//       id: filedialog
//       visible:false
    FileDialogs{
        id: filedialog
        visible:false
//        property string title: "Emulator"
//        anchors.fill: parent
 //      color: "#e3e3e3" // to match tab.png
}
//    FileDialogs{
//        property string title: "Video"
//        anchors.fill: parent
//       color: "#e3e3e3" // to match tab.png
//    }
//    FileDialogs{
//        property string title: "Input"
//        anchors.fill: parent
//       color: "#e3e3e3" // to match tab.png
//    }
//    FileDialogs{
//        property string title: "Audio"
//        anchors.fill: parent
//       color: "#e3e3e3" // to match tab.png
//    }
//    FileDialogs{
//        property string title: "Extras"
//        anchors.fill: parent
//       color: "#e3e3e3" // to match tab.png
//    }
}
//}


